Optimal. Leaf size=244 \[ \frac {C \sec ^{1+m}(c+d x) (a+a \sec (c+d x))^n \sin (c+d x)}{d (1+m+n)}+\frac {2^{\frac {3}{2}+n} C n F_1\left (\frac {1}{2};1-m,-\frac {1}{2}-n;\frac {3}{2};1-\sec (c+d x),\frac {1}{2} (1-\sec (c+d x))\right ) (1+\sec (c+d x))^{-\frac {1}{2}-n} (a+a \sec (c+d x))^n \tan (c+d x)}{d (1+m+n)}+\frac {2^{\frac {1}{2}+n} (C (m-n)+A (1+m+n)) F_1\left (\frac {1}{2};1-m,\frac {1}{2}-n;\frac {3}{2};1-\sec (c+d x),\frac {1}{2} (1-\sec (c+d x))\right ) (1+\sec (c+d x))^{-\frac {1}{2}-n} (a+a \sec (c+d x))^n \tan (c+d x)}{d (1+m+n)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.37, antiderivative size = 244, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 5, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.152, Rules used = {4174, 4108,
3913, 3910, 138} \begin {gather*} \frac {2^{n+\frac {1}{2}} (A (m+n+1)+C (m-n)) \tan (c+d x) (\sec (c+d x)+1)^{-n-\frac {1}{2}} (a \sec (c+d x)+a)^n F_1\left (\frac {1}{2};1-m,\frac {1}{2}-n;\frac {3}{2};1-\sec (c+d x),\frac {1}{2} (1-\sec (c+d x))\right )}{d (m+n+1)}+\frac {C 2^{n+\frac {3}{2}} n \tan (c+d x) (\sec (c+d x)+1)^{-n-\frac {1}{2}} (a \sec (c+d x)+a)^n F_1\left (\frac {1}{2};1-m,-n-\frac {1}{2};\frac {3}{2};1-\sec (c+d x),\frac {1}{2} (1-\sec (c+d x))\right )}{d (m+n+1)}+\frac {C \sin (c+d x) \sec ^{m+1}(c+d x) (a \sec (c+d x)+a)^n}{d (m+n+1)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 138
Rule 3910
Rule 3913
Rule 4108
Rule 4174
Rubi steps
\begin {align*} \int \sec ^m(c+d x) (a+a \sec (c+d x))^n \left (A+C \sec ^2(c+d x)\right ) \, dx &=\frac {C \sec ^{1+m}(c+d x) (a+a \sec (c+d x))^n \sin (c+d x)}{d (1+m+n)}+\frac {\int \sec ^m(c+d x) (a+a \sec (c+d x))^n (a (C m+A (1+m+n))+a C n \sec (c+d x)) \, dx}{a (1+m+n)}\\ &=\frac {C \sec ^{1+m}(c+d x) (a+a \sec (c+d x))^n \sin (c+d x)}{d (1+m+n)}+\frac {(C n) \int \sec ^m(c+d x) (a+a \sec (c+d x))^{1+n} \, dx}{a (1+m+n)}+\left (A+\frac {C (m-n)}{1+m+n}\right ) \int \sec ^m(c+d x) (a+a \sec (c+d x))^n \, dx\\ &=\frac {C \sec ^{1+m}(c+d x) (a+a \sec (c+d x))^n \sin (c+d x)}{d (1+m+n)}+\frac {\left (C n (1+\sec (c+d x))^{-n} (a+a \sec (c+d x))^n\right ) \int \sec ^m(c+d x) (1+\sec (c+d x))^{1+n} \, dx}{1+m+n}+\left (\left (A+\frac {C (m-n)}{1+m+n}\right ) (1+\sec (c+d x))^{-n} (a+a \sec (c+d x))^n\right ) \int \sec ^m(c+d x) (1+\sec (c+d x))^n \, dx\\ &=\frac {C \sec ^{1+m}(c+d x) (a+a \sec (c+d x))^n \sin (c+d x)}{d (1+m+n)}+\frac {\left (C n (1+\sec (c+d x))^{-\frac {1}{2}-n} (a+a \sec (c+d x))^n \tan (c+d x)\right ) \text {Subst}\left (\int \frac {(1-x)^{-1+m} (2-x)^{\frac {1}{2}+n}}{\sqrt {x}} \, dx,x,1-\sec (c+d x)\right )}{d (1+m+n) \sqrt {1-\sec (c+d x)}}+\frac {\left (\left (A+\frac {C (m-n)}{1+m+n}\right ) (1+\sec (c+d x))^{-\frac {1}{2}-n} (a+a \sec (c+d x))^n \tan (c+d x)\right ) \text {Subst}\left (\int \frac {(1-x)^{-1+m} (2-x)^{-\frac {1}{2}+n}}{\sqrt {x}} \, dx,x,1-\sec (c+d x)\right )}{d \sqrt {1-\sec (c+d x)}}\\ &=\frac {C \sec ^{1+m}(c+d x) (a+a \sec (c+d x))^n \sin (c+d x)}{d (1+m+n)}+\frac {2^{\frac {3}{2}+n} C n F_1\left (\frac {1}{2};1-m,-\frac {1}{2}-n;\frac {3}{2};1-\sec (c+d x),\frac {1}{2} (1-\sec (c+d x))\right ) (1+\sec (c+d x))^{-\frac {1}{2}-n} (a+a \sec (c+d x))^n \tan (c+d x)}{d (1+m+n)}+\frac {2^{\frac {1}{2}+n} \left (A+\frac {C (m-n)}{1+m+n}\right ) F_1\left (\frac {1}{2};1-m,\frac {1}{2}-n;\frac {3}{2};1-\sec (c+d x),\frac {1}{2} (1-\sec (c+d x))\right ) (1+\sec (c+d x))^{-\frac {1}{2}-n} (a+a \sec (c+d x))^n \tan (c+d x)}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [F]
time = 20.28, size = 0, normalized size = 0.00 \begin {gather*} \int \sec ^m(c+d x) (a+a \sec (c+d x))^n \left (A+C \sec ^2(c+d x)\right ) \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 1.37, size = 0, normalized size = 0.00 \[\int \left (\sec ^{m}\left (d x +c \right )\right ) \left (a +a \sec \left (d x +c \right )\right )^{n} \left (A +C \left (\sec ^{2}\left (d x +c \right )\right )\right )\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a \left (\sec {\left (c + d x \right )} + 1\right )\right )^{n} \left (A + C \sec ^{2}{\left (c + d x \right )}\right ) \sec ^{m}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \left (A+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right )\,{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^n\,{\left (\frac {1}{\cos \left (c+d\,x\right )}\right )}^m \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________